import request from '@/utils/request'
import data from "../../views/system/dict/data.vue";

// 查询公海管理列表
export function listSeas(query) {
  return request({
    url: '/highSeas/seas/list',
    method: 'get',
    params: query
  })
}

// 查询公海管理详细
export function getSeas(enterpriseId) {
  return request({
    url: '/highSeas/seas/' + enterpriseId,
    method: 'get'
  })
}
//转公海
export function convertSeas(data){
  return request({
    url:'/highSeas/seas/convert',
    method:'post',
    data:data
  })
}

// 新增公海管理
export function addSeas(data) {
  return request({
    url: '/highSeas/seas',
    method: 'post',
    data: data
  })
}

// 修改公海管理
export function updateSeas(data) {
  return request({
    url: '/highSeas/seas',
    method: 'put',
    data: data
  })
}

// 删除公海管理
export function delSeas(enterpriseId) {
  return request({
    url: '/highSeas/seas/' + enterpriseId,
    method: 'delete'
  })
}

//公海转电销
export function convertElectric(ids,deptId){
  return request({
    url:"/electric/electric/convert/"+ids+"/"+deptId,
    method:'delete'
  })
}

//修改主分类
export function updateClass(data){
  return request({
    url:"/highSeas/seas/updateClass",
    method:'post',
    data:data
  })
}
export function editBusinessManager(data) {
  return request({
    url: "/highSeas/seas/editBusinessManager",
    method: "post",
    data
  });
}

export function treeEle(id) {
  return request({
    url: "/system/user/deptTreeByEle",
    method: "get"
  });
}

export function getMaxEnterpriseNo() {
  return request({
    url: "/highSeas/seas/getMaxEnterpriseNo",
    method: "get",
  });
}
//删除公海
export function deleteSeas(id) {
  return request({
    url: "/highSeas/seas/" + id,
    method: "delete"
  });
  }
//获取企业信息来源
export function getSource() {
  return request({
    url: "/highSeas/seas/listSource",
    method: "get"
  });
}


